
<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  

<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
   
    User obj = User.fetch(con,loginInfo.getLoginUserId());//(UserPageData)context.getValue("UserPageData");
%>

<!--********************* Part3:JavaScript Code ***************-->
<script language="javascript">


var g_check_items = new Array();
var g_i = 0 ;

//g_check_items[g_i++] = new CheckItem("所属仓库","WarehouseName",true,true,20,false,0);

//g_check_items[g_i++] = new CheckItem("用户名","Code",true,true,20,false,0);

g_check_items[g_i++] = new CheckItem("姓名","Name",true,true,20,false,0);

g_check_items[g_i++] = new CheckItem("密码","Password",true,true,20,true,CHECK_ITEM_TYPE_PASSWORD);

g_check_items[g_i++] = new CheckItem("重复密码","RePassword",true,true,20,true,CHECK_ITEM_TYPE_SAME);

//g_check_items[g_i++] = new CheckItem("是否有效","Status",true,true,1,false,0);

//g_check_items[g_i++] = new CheckItem("备注","Remark",false,true,500,false,0);


function doSaveAndAdd()
{
    if(!CheckInput(g_check_items)) return false;
    if (confirm("确定要保存吗?"))
    {
        SetAction("saveAndNewConsumer");
        frm.submit();
    }
}
function doSave()
{
    if(!CheckInput(g_check_items)) return false;
    SetAction("saveConsumer");
    frm.submit();
}
function doCancel()
{
    SetAction("backListConsumer");
    frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSaveAndAdd);
</script>

<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->

<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code">

<input type=hidden name="Id" value="<%=obj.getId()%>">


<br>

<%=UIManager.addEditHeadTitle("用户设置")%>


<!--********************* Part5:Edit Area  ***************-->
<%=uiEditStart%>>
<%
    int key_tab = 1 ;
%>
    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>所属仓库:</td>
        <%=uiEditTD%>><%=loginInfo.getLoginWarehouseName()%>
            
        </td>
    </tr>

    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>用户名：</td>
        <%=uiEditTD%>>
        <%=obj.viewCode(con) %>
        
           <!--   <input type=text class="texts"  name="Code" size=20  value="<%=obj.viewCode(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font> -->
            
        </td>
    </tr>   

    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>姓名：</td>
        <%=uiEditTD%>>
            <input type=text class="texts"  name="Name" size=20  value="<%=obj.viewName(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
        </td>
    </tr>

    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>密码：</td>
        <%=uiEditTD%>>
            <input type=password class="texts"  name="Password" size=20  value="<%=obj.viewPassword(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
            密码由6-16个字符组成，请使用英文字母加数字或符号的组合密码。
        </td>
    </tr>
    
    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>重复密码：</td>
        <%=uiEditTD%>>
            <input type=password class="texts"  name="RePassword" same="Password" size=20  value="<%=obj.viewPassword(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
            请再输入一遍您上面输入的密码。
        </td>
    </tr>

    <!--  
    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>有效性：</td>
        <%=uiEditTD%>>
        <%=SelectManager.viewValidOrNoRadio("Status",obj.viewStatus(con), "key_tab="+(key_tab++)) %><font color=red>*</font>
        </td>
    </tr>
    
    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>备注：</td>
        <%=uiEditTD%>>
            <textarea cols="50" rows="3" name="Remark" key_tab="<%=key_tab++%>"><%=obj.viewRemark(con)%></textarea>
        </td>
    </tr>
    -->

<%=uiEditEnd%>

<!--********************* Part6:Action Area  ***************-->
<%=uiCommandStart%>>
    <%=uiCommandTR%>>
        <%=uiCommandTD%>>                     
            <input type=button class="buttons" value=" 保存 " onclick="doSaveAndAdd();return false;">
        </td>
    </tr>
<%=uiCommandEnd%>
</form>

<%@ include file="/framework/foot.jsp"%>

<!--
    Author    :justin
    FileName  :/system/base/UserEdit.jsp
-->
